<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><title>Template - Bonfire</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.5 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Template"></a>Template</h1><div class=CBody><p>The Template class makes the creation of consistently themed web pages across your entire site simple and as automatic as possible.</p><p>It supports parent/child themes, controller-named automatic overrides, and more.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Version</td><td class=CDLDescription>3.0</td></tr><tr><td class=CDLEntry>Author</td><td class=CDLDescription>Lonnie Ezell</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Template" >Template</a></td><td class=SDescription>The Template class makes the creation of consistently themed web pages across your entire site simple and as automatic as possible.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Template.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$active_theme" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">$active_theme</a></td><td class=SDescription>Stores the name of the active theme (folder) with a trailing slash.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$default_theme" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">$default_theme</a></td><td class=SDescription>Stores the default theme from the config file for a slight performance increase.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$current_view" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">$current_view</a></td><td class=SDescription>The view to load. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$layout" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">$layout</a></td><td class=SDescription>The layout to render the views into.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$parse_views" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">$parse_views</a></td><td class=SDescription>If true, CodeIgniter&rsquo;s Template Parser will be used to parse the view. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$data" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">$data</a></td><td class=SDescription>The data to be passed into the views. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$blocks" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">$blocks</a></td><td class=SDescription>An array of blocks. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$message" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">$message</a></td><td class=SDescription>Holds a simple array to store the status Message that gets displayed using the message() function.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$theme_paths" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">$theme_paths</a></td><td class=SDescription>An array of paths to look for themes.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$site_path" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">$site_path</a></td><td class=SDescription>The full server path to the site root.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Template.$orig_view_path" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">$orig_view_path</a></td><td class=SDescription>Stores CI&rsquo;s default view path.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#Template.$ci" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">$ci</a></td><td class=SDescription>An instance of the CI super object.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Template.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.__construct" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">__construct()</a></td><td class=SDescription>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.init" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">init()</a></td><td class=SDescription>Grabs an instance of the CI superobject, loads the Ocular config file, and sets our default layout.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.render" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">render()</a></td><td class=SDescription>Renders out the specified layout, which starts the process of rendering the page content. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.yield" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">yield()</a></td><td class=SDescription>Renders the current page into the layout.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.set_block" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">set_block()</a></td><td class=SDescription>Stores the block named $name in the blocks array for later rendering. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.block" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')">block()</a></td><td class=SDescription>Renders a &ldquo;block&rdquo; to the view.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.add_theme_path" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')">add_theme_path()</a></td><td class=SDescription>Theme paths allow you to have multiple locations for themes to be stored. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.remove_theme_path" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')">remove_theme_path()</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.set_theme" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')">set_theme()</a></td><td class=SDescription>Stores the name of the active theme to use. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.theme" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')">theme()</a></td><td class=SDescription>Returns the active theme.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.theme_url" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')">theme_url()</a></td><td class=SDescription>Returns the full url to a file in the currently active theme.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.set_view" id=link24 onMouseOver="ShowTip(event, 'tt24', 'link24')" onMouseOut="HideTip('tt24')">set_view()</a></td><td class=SDescription>Set the current view to render.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.set" id=link25 onMouseOver="ShowTip(event, 'tt25', 'link25')" onMouseOut="HideTip('tt25')">set()</a></td><td class=SDescription>Makes it easy to save information to be rendered within the views. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.get" id=link26 onMouseOver="ShowTip(event, 'tt26', 'link26')" onMouseOut="HideTip('tt26')">get()</a></td><td class=SDescription>Returns a variable that has been previously set, or false if not exists. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.parse_views" id=link27 onMouseOver="ShowTip(event, 'tt27', 'link27')" onMouseOut="HideTip('tt27')">parse_views()</a></td><td class=SDescription>Set whether or not the views will be passed through CI&rsquo;s parser.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.set_message" id=link28 onMouseOver="ShowTip(event, 'tt28', 'link28')" onMouseOut="HideTip('tt28')">set_message()</a></td><td class=SDescription>Sets a status message (for displaying small success/error messages). </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.message" id=link29 onMouseOver="ShowTip(event, 'tt29', 'link29')" onMouseOut="HideTip('tt29')">message()</a></td><td class=SDescription>Displays a status message (small success/error messages). </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.redirect" id=link30 onMouseOver="ShowTip(event, 'tt30', 'link30')" onMouseOut="HideTip('tt30')">redirect()</a></td><td class=SDescription>Returns a javascript solution for page redirection. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.load_view" id=link31 onMouseOver="ShowTip(event, 'tt31', 'link31')" onMouseOut="HideTip('tt31')">load_view()</a></td><td class=SDescription>Loads a view based on the current themes.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.find_file" id=link32 onMouseOver="ShowTip(event, 'tt32', 'link32')" onMouseOut="HideTip('tt32')">find_file</a></td><td class=SDescription>Searches through the the active theme and the default theme to try to find a view file. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.theme_view" id=link33 onMouseOver="ShowTip(event, 'tt33', 'link33')" onMouseOut="HideTip('tt33')">theme_view()</a></td><td class=SDescription>A shorthand method that allows views (from the current/default themes) to be included in any other view.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.check_class" id=link34 onMouseOver="ShowTip(event, 'tt34', 'link34')" onMouseOut="HideTip('tt34')">check_class()</a></td><td class=SDescription>A simple helper method for checking menu items against the current class that is running.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Template.check_method" id=link35 onMouseOver="ShowTip(event, 'tt35', 'link35')" onMouseOut="HideTip('tt35')">check_method()</a></td><td class=SDescription>A simple helper method for checking menu items against the current class&rsquo; method that is being executed (as far as the Router knows.)</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Template.breadcrumb" id=link36 onMouseOver="ShowTip(event, 'tt36', 'link36')" onMouseOut="HideTip('tt36')">breadcrumb()</a></td><td class=SDescription>Will create a breadcrumb from either the uri-&gt;segments or from a key/value paired array passed into it.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Template.Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$active_theme"></a>$active_theme</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $active_theme</td></tr></table></blockquote><p>Stores the name of the active theme (folder) with a trailing slash.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$default_theme"></a>$default_theme</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $default_theme</td></tr></table></blockquote><p>Stores the default theme from the config file for a slight performance increase.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$current_view"></a>$current_view</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $current_view</td></tr></table></blockquote><p>The view to load.&nbsp; Normally not set unless you need to bypass the automagic.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$layout"></a>$layout</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $layout</td></tr></table></blockquote><p>The layout to render the views into.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$parse_views"></a>$parse_views</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $parse_views</td></tr></table></blockquote><p>If true, CodeIgniter&rsquo;s Template Parser will be used to parse the view.&nbsp; If false, the view is displayed with no parsing.&nbsp; Used by the yield() and block()</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$data"></a>$data</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $data</td></tr></table></blockquote><p>The data to be passed into the views.&nbsp; The keys are the names of the variables and the values are the values.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$blocks"></a>$blocks</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $blocks</td></tr></table></blockquote><p>An array of blocks.&nbsp; The key is the name to reference it by, and the value is the file.&nbsp; The class will loop through these, parse them, and push them into the layout.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$message"></a>$message</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $message</td></tr></table></blockquote><p>Holds a simple array to store the status Message that gets displayed using the message() function.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$theme_paths"></a>$theme_paths</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $theme_paths</td></tr></table></blockquote><p>An array of paths to look for themes.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$site_path"></a>$site_path</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $site_path</td></tr></table></blockquote><p>The full server path to the site root.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$orig_view_path"></a>$orig_view_path</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $orig_view_path</td></tr></table></blockquote><p>Stores CI&rsquo;s default view path.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="Template.$ci"></a>$ci</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $ci</td></tr></table></blockquote><p>An instance of the CI super object.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Template.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.__construct"></a>__construct()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public function __construct()</td></tr></table></blockquote><p>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</p><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.init"></a>init()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function init()</td></tr></table></blockquote><p>Grabs an instance of the CI superobject, loads the Ocular config file, and sets our default layout.</p><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.render"></a>render()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function render(</td><td class=PParameter nowrap>$layout</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Renders out the specified layout, which starts the process of rendering the page content.&nbsp; Also determines the correct view to use based on the current controller/method.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$layout</td><td class=CDLDescription>The name of the a layout to use.&nbsp; This overrides any current or default layouts set.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.yield"></a>yield()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function yield()</td></tr></table></blockquote><p>Renders the current page into the layout.</p><p>Uses a view based on the controller/function being run.&nbsp; (See __constructor).</p><h4 class=CHeading>Return</h4><p>a string containing the output of the render process.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.set_block"></a>set_block()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_block(</td><td class=PParameter nowrap>$block_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$view_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Stores the block named $name in the blocks array for later rendering.&nbsp; The $current_view variable is the name of an existing view.&nbsp; If it is empty, your script should still function as normal.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$block_name</td><td class=CDLDescription>the name of the block.&nbsp; Must match the name in the block() method.</td></tr><tr><td class=CDLEntry>$view_name</td><td class=CDLDescription>the name of the view file to render.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.block"></a>block()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function block(</td><td class=PParameter nowrap>$block_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$default_view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>array(),</td></tr><tr><td></td><td class=PParameter nowrap>$themed</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Renders a &ldquo;block&rdquo; to the view.</p><p>A block is a partial view contained in a view file in the application/views folder.&nbsp; It can be used for sidebars, headers, footers, or any other recurring element within a site.&nbsp; It is recommended to set a default when calling this function within a layout.&nbsp; The default will be rendered if no methods override the view (using the set_block() method).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$block_name</td><td class=CDLDescription>The name of the block to render.</td></tr><tr><td class=CDLEntry>$default_view</td><td class=CDLDescription>The view to render if no other view has been set with the set_block() method.</td></tr><tr><td class=CDLEntry>$data</td><td class=CDLDescription>An array of data to pass to the view.</td></tr><tr><td class=CDLEntry>$themed</td><td class=CDLDescription>Whether we should look in the themes or standard view locations.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.add_theme_path"></a>add_theme_path()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function add_theme_path(</td><td class=PParameter nowrap>$path</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Theme paths allow you to have multiple locations for themes to be stored.&nbsp; This might be used for separating themes for different sub- applications, or a core theme and user-submitted themes.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$path</td><td class=CDLDescription>A new path where themes can be found.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.remove_theme_path"></a>remove_theme_path()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function remove_theme_path(</td><td class=PParameter nowrap>$path</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$path</td><td class=CDLDescription>The path to remove from the theme paths.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.set_theme"></a>set_theme()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_theme(</td><td class=PParameter nowrap>$theme</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Stores the name of the active theme to use.&nbsp; This theme should be relative to one of the &lsquo;template.theme_paths&rsquo; folders.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$theme</td><td class=CDLDescription>The name of the active theme.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.theme"></a>theme()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function theme()</td></tr></table></blockquote><p>Returns the active theme.</p><h4 class=CHeading>Return</h4><p>The name of the active theme.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.theme_url"></a>theme_url()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function theme_url(</td><td class=PParameter nowrap>$resource</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the full url to a file in the currently active theme.</p><h4 class=CHeading>Return</h4><p>The full url (including <a href="http://" class=LURL target=_top>http://</a>) to the resource.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.set_view"></a>set_view()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_view(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Set the current view to render.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$view</td><td class=CDLDescription>The name of the view file to render as content.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.set"></a>set()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set(</td><td class=PParameter nowrap>$var_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$value</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Makes it easy to save information to be rendered within the views.&nbsp; As of 3.0, can also set any of the class properties.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$var_name</td><td class=CDLDescription>The name of the variable to set</td></tr><tr><td class=CDLEntry>$value</td><td class=CDLDescription>The value to set it to.&nbsp; @return void</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.get"></a>get()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function get(</td><td class=PParameter nowrap>$var_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a variable that has been previously set, or false if not exists.&nbsp; As of 3.0, will also return class properties.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$var_name</td><td class=CDLDescription>The name of the data item to return.</td></tr></table><h4 class=CHeading>Return</h4><p>The value of the class property or view data.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.parse_views"></a>parse_views()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function parse_views(</td><td class=PParameter nowrap>$parse</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Set whether or not the views will be passed through CI&rsquo;s parser.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$parse</td><td class=CDLDescription>boolean value.&nbsp; Should we parse views?</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.set_message"></a>set_message()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_message(</td><td class=PParameter nowrap>$message</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$type</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'info'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets a status message (for displaying small success/error messages).&nbsp; This function is used in place of the session-&gt;flashdata function, because you don&rsquo;t always want to have to refresh the page to get the message to show up.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$message</td><td class=CDLDescription>A string with the message to save.</td></tr><tr><td class=CDLEntry>$type</td><td class=CDLDescription>A string to be included as the CSS class of the containing div.</td></tr></table><h4 class=CHeading>Return</h4><p>void</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.message"></a>message()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function message(</td><td class=PParameter nowrap>$message</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$type</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'information'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Displays a status message (small success/error messages).&nbsp; If data exists in &lsquo;message&rsquo; session flashdata, that will override any other messages.&nbsp; The renders the message based on the template provided in the config file (&lsquo;OCU_message_template&rsquo;).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$message</td><td class=CDLDescription>a string to be the message.&nbsp; (Optional) If included, will override any other messages in the system.</td></tr><tr><td class=CDLEntry>$type</td><td class=CDLDescription>the class to attached to the div.&nbsp; (i.e.&nbsp; &lsquo;information&rsquo;, &lsquo;attention&rsquo;, &lsquo;error&rsquo;, &lsquo;success&rsquo;)</td></tr></table><h4 class=CHeading>Return</h4><p>A string with the results of inserting the message into the message template.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.redirect"></a>redirect()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function redirect(</td><td class=PParameter nowrap>$url</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a javascript solution for page redirection.&nbsp; This is especially handy when you want to redirect out of an ajax request to a standard http request.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$url</td><td class=CDLDescription>The url to redirect to.&nbsp; If not a full url, will wrap it in site_url().</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.load_view"></a>load_view()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function load_view(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$override</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$is_themed</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>true,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&amp;</td><td class=PParameter nowrap>$output</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Loads a view based on the current themes.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$view</td><td class=CDLDescription>The view to load.</td></tr><tr><td class=CDLEntry>$data</td><td class=CDLDescription>An array of data elements to be made available to the views</td></tr><tr><td class=CDLEntry>$override</td><td class=CDLDescription>The name of a view to check for first (used for controller-based layouts)</td></tr><tr><td class=CDLEntry>$is_themed</td><td class=CDLDescription>Whether it should check in the theme folder first.</td></tr><tr><td class=CDLEntry>&amp;$output</td><td class=CDLDescription>A pointer to the variable to store the output of the loaded view into.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.find_file"></a>find_file</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>private function find_file(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches through the the active theme and the default theme to try to find a view file.&nbsp; If found, it returns the rendered view.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$view</td><td class=CDLDescription>The name of the view to find.</td></tr><tr><td class=CDLEntry>$data</td><td class=CDLDescription>An array of key/value pairs to pass to the views.</td></tr></table><h4 class=CHeading>Return</h4><p>The content of the file, if found, else empty.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.theme_view"></a>theme_view()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function theme_view(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>A shorthand method that allows views (from the current/default themes) to be included in any other view.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$view</td><td class=CDLDescription>the name of the view to render.</td></tr><tr><td class=CDLEntry>$data</td><td class=CDLDescription>an array of data to pass to the view.</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.check_class"></a>check_class()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function check_class(</td><td class=PParameter nowrap>$item</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>A simple helper method for checking menu items against the current class that is running.</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$item</td><td class=CDLDescription>The name of the class to check against.</td></tr></table><h4 class=CHeading>Return</h4><p>Either &lt;b&gt;class=&rdquo;current&rdquo;&lt;/b&gt; or an empty string.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.check_method"></a>check_method()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function check_method(</td><td class=PParameter nowrap>$item</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>A simple helper method for checking menu items against the current class&rsquo; method that is being executed (as far as the Router knows.)</p><h4 class=CHeading>Parameter</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$item</td><td class=CDLDescription>The name of the method to check against.</td></tr></table><h4 class=CHeading>Return</h4><p>Either &lt;b&gt;class=&rdquo;current&rdquo;&lt;/b&gt; or an empty string.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="Template.breadcrumb"></a>breadcrumb()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function breadcrumb(</td><td class=PParameter nowrap>$my_segments</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Will create a breadcrumb from either the uri-&gt;segments or from a key/value paired array passed into it.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MTitle>Bonfire<div class=MSubTitle>Faster CodeIgniter Development</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Guides</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../../files2/installing-txt.html">Installing Bonfire</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/modules/overview-txt.html">Modules Overview</a></div></div><div class=MEntry><div class=MFile><a href="../../files2/auth_notes-txt.html">Understanding Authentication</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Helpers</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../helpers/address_helper-php.html">Address Helper</a></div></div><div class=MEntry><div class=MFile><a href="../helpers/application_helper-php.html">Application Helper</a></div></div><div class=MEntry><div class=MFile><a href="../helpers/config_file_helper-php.html">Config File Helper</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Libraries</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="assets-php.html">Assets</a></div></div><div class=MEntry><div class=MFile id=MSelected>Template</div></div><div class=MEntry><div class=MFile><a href="../core_modules/users/libraries/auth-php.html">Auth</a></div></div><div class=MEntry><div class=MFile><a href="Console-php.html">Console</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Core Overrides</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../core/MY_Controller-php.html">Controllers</a></div></div><div class=MEntry><div class=MFile><a href="../core/MY_Model-php.html">MY_Model</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Core Modules</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../core_modules/emailer/libraries/emailer-php.html">Emailer</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/migrations/libraries/Migrations-php.html">Migrations</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/permission_model-php.html">Permission_model</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/roles/models/role_model-php.html">Role_model</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../controllers/install-php.html">controllers/<wbr>install.php</a></div></div><div class=MEntry><div class=MFile><a href="../core_modules/logs/controllers/developer-php.html">core_modules/.../controllers/<wbr>developer.php</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Index</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([3, 4, 2, 5, 1], 7);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $active_theme</td></tr></table></blockquote>Stores the name of the active theme (folder) with a trailing slash.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $default_theme</td></tr></table></blockquote>Stores the default theme from the config file for a slight performance increase.</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $current_view</td></tr></table></blockquote>The view to load. </div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $layout</td></tr></table></blockquote>The layout to render the views into.</div></div><div class=CToolTip id="tt5"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $parse_views</td></tr></table></blockquote>If true, CodeIgniter&rsquo;s Template Parser will be used to parse the view. </div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $data</td></tr></table></blockquote>The data to be passed into the views. </div></div><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $blocks</td></tr></table></blockquote>An array of blocks. </div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $message</td></tr></table></blockquote>Holds a simple array to store the status Message that gets displayed using the message() function.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $theme_paths</td></tr></table></blockquote>An array of paths to look for themes.</div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static $site_path</td></tr></table></blockquote>The full server path to the site root.</div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>protected static $orig_view_path</td></tr></table></blockquote>Stores CI&rsquo;s default view path.</div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>private static $ci</td></tr></table></blockquote>An instance of the CI super object.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public function __construct()</td></tr></table></blockquote>This constructor is here purely for CI&rsquo;s benefit, as this is a static class.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function init()</td></tr></table></blockquote>Grabs an instance of the CI superobject, loads the Ocular config file, and sets our default layout.</div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function render(</td><td class=PParameter nowrap>$layout</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Renders out the specified layout, which starts the process of rendering the page content. </div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function yield()</td></tr></table></blockquote>Renders the current page into the layout.</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_block(</td><td class=PParameter nowrap>$block_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$view_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Stores the block named $name in the blocks array for later rendering. </div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function block(</td><td class=PParameter nowrap>$block_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$default_view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>array(),</td></tr><tr><td></td><td class=PParameter nowrap>$themed</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>false</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Renders a &ldquo;block&rdquo; to the view.</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function add_theme_path(</td><td class=PParameter nowrap>$path</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Theme paths allow you to have multiple locations for themes to be stored. </div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function remove_theme_path(</td><td class=PParameter nowrap>$path</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_theme(</td><td class=PParameter nowrap>$theme</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Stores the name of the active theme to use. </div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>public static function theme()</td></tr></table></blockquote>Returns the active theme.</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function theme_url(</td><td class=PParameter nowrap>$resource</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns the full url to a file in the currently active theme.</div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_view(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Set the current view to render.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set(</td><td class=PParameter nowrap>$var_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$value</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Makes it easy to save information to be rendered within the views. </div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function get(</td><td class=PParameter nowrap>$var_name</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns a variable that has been previously set, or false if not exists. </div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function parse_views(</td><td class=PParameter nowrap>$parse</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Set whether or not the views will be passed through CI&rsquo;s parser.</div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function set_message(</td><td class=PParameter nowrap>$message</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$type</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'info'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sets a status message (for displaying small success/error messages). </div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function message(</td><td class=PParameter nowrap>$message</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameter nowrap>$type</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'information'</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Displays a status message (small success/error messages). </div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public function redirect(</td><td class=PParameter nowrap>$url</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns a javascript solution for page redirection. </div></div><div class=CToolTip id="tt31"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>public static function load_view(</td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$override</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>'',</td></tr><tr><td></td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>$is_themed</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>true,</td></tr><tr><td></td><td class=PParameterPrefix nowrap>&amp;</td><td class=PParameter nowrap>$output</td><td class=PDefaultValuePrefix>&nbsp;&nbsp;</td><td class=PDefaultValue width=100%></td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Loads a view based on the current themes.</div></div><div class=CToolTip id="tt32"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>private function find_file(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Searches through the the active theme and the default theme to try to find a view file. </div></div><div class=CToolTip id="tt33"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function theme_view(</td><td class=PParameter nowrap>$view</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null,</td></tr><tr><td></td><td class=PParameter nowrap>$data</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>A shorthand method that allows views (from the current/default themes) to be included in any other view.</div></div><div class=CToolTip id="tt34"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function check_class(</td><td class=PParameter nowrap>$item</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>A simple helper method for checking menu items against the current class that is running.</div></div><div class=CToolTip id="tt35"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function check_method(</td><td class=PParameter nowrap>$item</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>''</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>A simple helper method for checking menu items against the current class&rsquo; method that is being executed (as far as the Router knows.)</div></div><div class=CToolTip id="tt36"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function breadcrumb(</td><td class=PParameter nowrap>$my_segments</td><td class=PDefaultValuePrefix>&nbsp;=&nbsp;</td><td class=PDefaultValue width=100%>null</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Will create a breadcrumb from either the uri-&gt;segments or from a key/value paired array passed into it.</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>